#ifndef _CLIENT_PROTOCOL_H_
# define _CLIENT_PROTOCOL_H_

#include <stdarg.h>
#include <pthread.h>

#define DATA_TYPE_ERROR 0
#define DATA_TYPE_STRING 1
#define DATA_TYPE_INT 2
#define DATA_TYPE_LIST 3
#define DATA_TYPE_GRAPH 4

typedef struct _w3lclient {
	int socket;
	short connected;
	pthread_mutex_t mutex;
} w3lclient;

w3lclient *
init_client(char *host, int port);
char *
w3lRequest(w3lclient *client, char *request,...);
short request_send(int sd, char *data);
char *reply_read(int sd,long *len);

#endif
